﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.CustomRenderTextureManager
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Custom Render Texture Manager.</para>
  /// </summary>
  [NativeHeader("Runtime/Graphics/CustomRenderTextureManager.h")]
  public static class CustomRenderTextureManager
  {
    public static event Action<CustomRenderTexture> textureLoaded;

    [RequiredByNativeCode]
    private static void InvokeOnTextureLoaded_Internal(CustomRenderTexture source)
    {
      Action<CustomRenderTexture> textureLoaded = CustomRenderTextureManager.textureLoaded;
      if (textureLoaded == null)
        return;
      textureLoaded(source);
    }

    public static event Action<CustomRenderTexture> textureUnloaded;

    [RequiredByNativeCode]
    private static void InvokeOnTextureUnloaded_Internal(CustomRenderTexture source)
    {
      Action<CustomRenderTexture> textureUnloaded = CustomRenderTextureManager.textureUnloaded;
      if (textureUnloaded == null)
        return;
      textureUnloaded(source);
    }

    [FreeFunction(Name = "CustomRenderTextureManagerScripting::GetAllCustomRenderTextures", HasExplicitThis = false)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern void GetAllCustomRenderTextures(
      List<CustomRenderTexture> currentCustomRenderTextures);

    public static event Action<CustomRenderTexture, int> updateTriggered;

    internal static void InvokeTriggerUpdate(CustomRenderTexture crt, int updateCount)
    {
      Action<CustomRenderTexture, int> updateTriggered = CustomRenderTextureManager.updateTriggered;
      if (updateTriggered == null)
        return;
      updateTriggered(crt, updateCount);
    }

    public static event Action<CustomRenderTexture> initializeTriggered;

    internal static void InvokeTriggerInitialize(CustomRenderTexture crt)
    {
      Action<CustomRenderTexture> initializeTriggered = CustomRenderTextureManager.initializeTriggered;
      if (initializeTriggered == null)
        return;
      initializeTriggered(crt);
    }
  }
}
